package com.java.oop;

public class Superman extends Human implements FastPower,FlyPower,AttackPower{
    @Override
    public void eat() {
        System.out.println("超人晒太阳，当作吃饭");
    }

    @Override
    public void run() {
        System.out.println("超人以"+ FastPower.SPEED+"m/s的速度奔跑");
    }

    @Override
    public void fly() {
        System.out.println("超人以光速飞行");
    }

    @Override
    public void attack() {
        System.out.println("超人发射激光攻击敌人");
    }

    public static void main(String[] args) {
        Superman superman = new Superman();
        superman.eat();
        superman.run();
        superman.fly();
        superman.attack();
    }
}

interface FastPower{
    int SPEED = 10000;//速度常量
    void run();//跑步
}
interface FlyPower{

    void fly();
}
interface AttackPower{
    void attack();
}